﻿using System.ComponentModel;
using System.Data;
using Types.Constants;

namespace Contracts.Caching
{
	public interface ICacheProvider
	{
		T GetCacheItem<T>(string key) where T : DataSet;
		void RefreshCacheItem(string key);

		DataSet GetCacheItem(string key);

		[Description(CommonConstants.Messages.MethodIsInternal)]
		void RemoveCacheItem(string key);

		bool HasCacheItem(string key);

		[Description("This method for only AppFabricCacheProvider. It doesn't work with other providers")]
		DataSet GetCacheItemIfNewer(string key);

	}


}
